﻿namespace Softserve.Pottery.Store.Domains
{
	using System;
	using System.Data.Services.Common;
	using System.Runtime.Serialization;
	using Softserve.Pottery.Infrastructure;
    using Softserve.Pottery.Infrastructure.Interfaces;	

	[DataContract]
	[DataServiceEntity]
    public class User : IValidatable, IDomain
	{
		public User() { }

		#region Properties

		[DataMember]
		public int Id
		{
			get { return m_Id; }
			set { m_Id = value; }
		}

		[DataMember]
		public string PartnerCardNumber
		{
			get { return m_PartnerCardNumber; }
			set { m_PartnerCardNumber = value; }
		}

		[DataMember]
		public decimal CumulativeSum
		{
			get { return m_CumulativeSum; }
			set { m_CumulativeSum = value; }
		}

		[DataMember]
		public int Status
		{
			get { return m_Status; }
			set { m_Status = value; }
		}

		[DataMember]
		public DateTime DateCreate
		{
			get { return m_DateCreate; }
			set { m_DateCreate = value; }
		}

		[DataMember]
		public string FirstName
		{
			get { return m_FirstName; }
			set { m_FirstName = value; }
		}

		[DataMember]
		public string LastName
		{
			get { return m_LastName; }
			set { m_LastName = value; }
		}

		[DataMember]
		public string MiddleName
		{
			get { return m_MiddleName; }
			set { m_MiddleName = value; }
		}

		[DataMember]
		public string Email
		{
			get { return m_Email; }
			set { m_Email = value; }
		}

		[DataMember]
		public string PhoneNumber
		{
			get { return m_PhoneNumber; }
			set { m_PhoneNumber = value; }
		}

		[DataMember]
        public UserGroup Group
		{
			get { return m_Group; }
			set { m_Group = value; }
		}	

		#endregion

		#region Methods

		public bool Validate()
		{
			return true;
		}

		#endregion

		#region Private fields

		private int m_Id = default(int);

		private string m_PartnerCardNumber = String.Empty;

		private decimal m_CumulativeSum = default(decimal);

		private int m_Status = default(int);

        private DateTime m_DateCreate = default(DateTime);

		private string m_FirstName = String.Empty;

		private string m_LastName = String.Empty;

		private string m_MiddleName = String.Empty;

		private string m_Email = String.Empty;

		private string m_PhoneNumber = String.Empty;

        private UserGroup m_Group = UserGroup.Guest;
		#endregion
	}
}
